<?php

Route::group([
    'prefix' => 'admin',
    'middleware' =>'auth.admin',
], function () {
    Route::get('menu/list', [
        'as' => 'AdminMenuList',
        'alias' => '菜单列表',
        'uses' => 'Admin\MenuController@getList'
    ]);

    Route::get('menu/edit', [
        'as' => 'AdminMenuEdit',
        'alias' => '菜单编辑',
        'uses' => 'Admin\MenuController@getEdit'
    ]);

    Route::post('menu/edit', [
        'as' => 'AdminMenuEditAction',
        'alias' => '菜单编辑保存',
        'uses' => 'Admin\MenuController@save'
    ]);

    Route::post('menu/delete', [
        'as' => 'AdminMenuDelete',
        'alias' => '菜单删除',
        'uses' => 'Admin\MenuController@delete'
    ]);

    Route::get('menu/loadlist', [
        'as' => 'AdminMenuLoadList',
        'alias' => '导入菜单',
        'uses' => 'Admin\MenuController@getLoadList'
    ]);

    Route::post('menu/loadsave', [
        'as' => 'AdminMenuLoadSave',
        'alias' => '导入菜单保存',
        'uses' => 'Admin\MenuController@saveLoad'
    ]);

});